<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
          xmlns:o="urn:schemas-microsoft-com:office:office"
          xmlns:x="urn:schemas-microsoft-com:office:excel"
          xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
          xmlns:html="http://www.w3.org/TR/REC-html40">
  <Worksheet ss:Name="Sheet1">
    <Table>
      <Row>
        <%= @titles.each do |t| %>
            <Cell>
              <Data ss:Type="String"><%= t %></Data>
            </Cell>
        <% end %>
      </Row>
      <% @fields.each do |f| %>
          <Row>
            <% f.each do |val| %>
                <Cell>
                  <Data ss:Type="String"><%= val %></Data>
                </Cell>
            <% end %>
          </Row>
      <% end %>
    </Table>
  </Worksheet>
</Workbook>